import numpy as np
import pandas as pd
#pd.set_option('display.max_columns', None)
#pd.set_option('display.max_rows', None)
predict_1=pd.read_csv("predict_1.csv")
predict_2=pd.read_csv("predict_2.csv")
predict_3=pd.read_csv("predict_3.csv")
integrate=pd.concat([predict_1["is_5g"],predict_2["is_5g"],predict_3["is_5g"]],axis=1)
integrate["sum"]=integrate.sum(axis=1)
print(integrate)
integrate_np=np.array(integrate)
result=np.where(integrate_np[:,3]>=2,1,0)
print(integrate)
integrate[["result"]]=pd.DataFrame(result)
print([column for column in integrate])
predict_1_2_3=pd.concat([predict_1["user_id"],integrate["result"]],axis=1)
predict_1_2_3=predict_1_2_3.rename(columns={"result":'is_5g'})
print(predict_1_2_3)
predict_1_2_3.to_csv("predict_1_2_3.csv",index=0)
